package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.time.LocalDate;
import java.util.List;

@TableName("t_man")
public class ManBean {
    @TableId(value = "pk_manId",type = IdType.AUTO)
    private int id;
    @TableField("m_name")
    private String name;
    @TableField("m_birthday")
    private LocalDate birthday;
    @TableField(exist = false)
    private List<RoomBean> roomList;

    public ManBean(String name, LocalDate birthday) {
        this.name = name;
        this.birthday = birthday;
    }

    public ManBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public List<RoomBean> getRoomList() {
        return roomList;
    }

    public void setRoomList(List<RoomBean> roomList) {
        this.roomList = roomList;
    }

    @Override
    public String toString() {
        return "ManBean{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", birthday=" + birthday +
                ", roomList=" + roomList +
                "}\n";
    }
}
